class Solution(object):
    def getFactors(self, n):
        """
        :type n: int
        :rtype: List[List[int]]
        """
        def Factor_k(i, m):
            now_list = []
            while i <= m ** 0.5:
                if m % i == 0:
                    houzhui_list = Factor_k(i, m // i)
                    for item in houzhui_list:
                        now_list.append([i] + item)
                i += 1
            if 2 <=m < n:
                now_list.append([m])
            return now_list
        out = Factor_k(2, n)
        return out

data = Solution()
n = 32
print(data.getFactors(n))
